/**
 * @author LKQ
 * @date 2022/1/30 21:06
 * @description
 */
public class FormalSolution2 {
    public static void main(String[] args) {
        FormalSolution2 solution2 = new FormalSolution2();
        System.out.println(solution2.numberOfSteps(14));
    }
    public int numberOfSteps(int num) {
        int count = 0;
        while(num != 0){
            if((num & 1) == 0){
                num = num >> 1;
            }else{
                num ^= 1;
            }
            count++;
        }
        return count;
    }
}
